package com.snapan.entity;

import java.util.Date;

/**
 * 用户文件关联表
 */
public class UserFile {

    /**
     * 用户文件关联ID
     */
    private Long id;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 文件基础信息ID
     */
    private Long fileBaseId;

    /**
     * 用户自定义文件名
     */
    private String fileName;

    /**
     * 父目录ID（0表示根目录）
     */
    private Long parentId;

    /**
     * 是否目录：0-文件，1-目录
     */
    private Byte isDirectory;

    /**
     * 状态：0-删除，1-正常
     */
    private Byte status;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 删除时间
     */
    private Date deleteTime;

    /**
     * 存活时间
     */
    private Date expireTime;

    // 从file_base表关联的字段
    /**
     * 文件存储路径
     */
    private String filePath;

    /**
     * 文件大小（字节）
     */
    private Long fileSize;

    /**
     * 文件类型（MIME类型）
     */
    private String fileType;

    /**
     * 文件MD5值
     */
    private String fileMd5;

    /**
     * 分片总数
     */
    private Integer chunkCount;

    /**
     * 分片大小（字节）
     */
    private Long chunkSize;

    private Byte isRecycled;

    public UserFile() {
        this.isRecycled = (byte) 0; // 默认不在回收站
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getFileBaseId() {
        return fileBaseId;
    }

    public void setFileBaseId(Long fileBaseId) {
        this.fileBaseId = fileBaseId;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Byte getIsDirectory() {
        return isDirectory;
    }

    public void setIsDirectory(Byte isDirectory) {
        this.isDirectory = isDirectory;
    }

    public Byte getStatus() {
        return status;
    }

    public void setStatus(Byte status) {
        this.status = status;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Date getDeleteTime() {
        return deleteTime;
    }

    public void setDeleteTime(Date deleteTime) {
        this.deleteTime = deleteTime;
    }

    public Date getExpireTime() {
        return expireTime;
    }

    public void setExpireTime(Date expireTime) {
        this.expireTime = expireTime;
    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    public Long getFileSize() {
        return fileSize;
    }

    public void setFileSize(Long fileSize) {
        this.fileSize = fileSize;
    }

    public String getFileType() {
        return fileType;
    }

    public void setFileType(String fileType) {
        this.fileType = fileType;
    }

    public String getFileMd5() {
        return fileMd5;
    }

    public void setFileMd5(String fileMd5) {
        this.fileMd5 = fileMd5;
    }

    public Integer getChunkCount() {
        return chunkCount;
    }

    public void setChunkCount(Integer chunkCount) {
        this.chunkCount = chunkCount;
    }

    public Long getChunkSize() {
        return chunkSize;
    }

    public void setChunkSize(Long chunkSize) {
        this.chunkSize = chunkSize;
    }

    public Byte getIsRecycled() {
        return isRecycled;
    }

    public void setIsRecycled(Byte isRecycled) {
        this.isRecycled = isRecycled;
    }

    @Override
    public String toString() {
        return "UserFile{" +
                "id=" + id +
                ", userId=" + userId +
                ", fileBaseId=" + fileBaseId +
                ", fileName='" + fileName + '\'' +
                ", parentId=" + parentId +
                ", isDirectory=" + isDirectory +
                ", status=" + status +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", deleteTime=" + deleteTime +
                ", expireTime=" + expireTime +
                ", filePath='" + filePath + '\'' +
                ", fileSize=" + fileSize +
                ", fileType='" + fileType + '\'' +
                ", fileMd5='" + fileMd5 + '\'' +
                ", chunkCount=" + chunkCount +
                ", chunkSize=" + chunkSize +
                ", isRecycled=" + isRecycled +
                '}';
    }
}



























